﻿@model MvcCms.Data.Bug          
Related bugs:
<ul>
    @foreach (var bug in Model.RelatedBugs)
    { 
        <li>#@Html.ActionLink(bug.BugID.ToString(), "Edit", new { id = bug.BugID }): @bug.Title
            (@Ajax.ActionLink("Remove", "RemoveRelated", "Bug", new { id = Model.BugID, relatedID = bug.BugID }, new AjaxOptions { OnComplete = "UpdateRelated" }))</li>
    }
</ul>
@using (Ajax.BeginForm("AddRelated", "Bug", new { id = Model.BugID }, new AjaxOptions { OnComplete = "UpdateRelated" }, null))
{ 
    <label for="bugID">
        Related bug ID:</label>
    @Html.TextBox("relatedID")
    @Html.ValidationMessage("relatedID") 
    <input type="submit" value="Add related bug" />
}

